package com.liu.thread.ch02;

public class TickeWindow extends Thread {
	
private  int ticket = 1000;
	
	@Override
	public void run() {
		
		
		while(true){
			if(ticket>0){
				System.out.println(this.getName()+"售票。票号为："+ticket);
				ticket = ticket-1;
			
			}else{
				break;
			}
		}
	}

}
